﻿#region Header

/*
    This file is part of nDoctor Light

    NDoctor is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    NDoctor is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with NDoctor.  If not, see <http://www.gnu.org/licenses/>.
*/

#endregion Header

namespace Probel.Ldoc.Dal.Services
{
    using System;
    using System.Linq;

    using Probel.Ldoc.Services.Services;

    interface ISearcher<T> : IDisposable
    {
        #region Methods

        /// <summary>
        /// Finds the patient that fits the criterion. A logical OR will be applied and a String.Contains
        /// </summary>
        /// <param name="criterion">The criterion.</param>
        /// <returns>The found patients</returns>
        ///<remarks>http://stackoverflow.com/questions/9565360/how-to-convert-utf-8-characters-to-ascii-for-use-in-a-url</remarks>
        IQueryable<T> FindContainingOr(SearchCriterion criterion);

        /// <summary>
        /// Finds the patient that fits the criterion. A logical OR will be applied and a string.StartsWith
        /// </summary>
        /// <param name="criterion">The criterion.</param>
        /// <returns>The found patients</returns>
        ///<remarks>http://stackoverflow.com/questions/9565360/how-to-convert-utf-8-characters-to-ascii-for-use-in-a-url</remarks>
        IQueryable<T> FindStartWithOr(SearchCriterion criterion);

        #endregion Methods
    }
}